package model3d
{
	import laya.d3.core.Camera;
	import laya.display.Scene;

	/**
	 *默认绕着Y轴转 
	 * @author Administrator
	 */	
	public class RotateScriptY extends RotateScriptX
	{
		public function RotateScriptY()
		{
			super();
		}
		override protected function updateOwner():void {
			if (!isNaN(lastMouseX) && !isNaN(lastMouseY) && RockerView.angle==-1) {
				var scene:Scene =(owner as Camera).scene;
				if (isMouseDown) {
					var offsetX:Number = Laya.stage.mouseX - lastMouseX;
					var offsetY:Number = Laya.stage.mouseY - lastMouseY;
					
//					yawPitchRoll.x += offsetX * rotaionSpeed * 0.1;
					yawPitchRoll.y += offsetY * rotaionSpeed * 0.1;
					updateRotation();
				}
			}
			lastMouseX = Laya.stage.mouseX;
			lastMouseY = Laya.stage.mouseY;
		}
		
	}
}